<?php

if (!defined('IN_MOBILE_API')) {
    exit('Access Denied');
}

include_once 'forum.php';

class cloud_api {

    function common() {
//        $date=date("Y/m/d h:i:s",time()+3*60);
//        echo $date."<br>";
//        echo strtotime($date);
//        exit;
    }

    function output() {
        global $_G;
        if (empty($_GET['param1']) || empty($_GET['param2'])) {
            $variable = array(
                'code' => 1001,
                'messagestr' => lang('plugin/cloud', '1001'),
            );
        } else if (is_numeric($_GET['param1']) && is_numeric($_GET['param2'])) {
            $variable = array(
                'data' => array(
                    'sum' => intval($_GET['param1']) + intval($_GET['param2']),
                )
            );
        } else {
            $variable = array(
                'code' => 1002,
                'messagestr' => lang('plugin/cloud', '1002'),
            );
        }
        cloud_core::result(cloud_core::variable($variable));
    }
}

?>